Health Cloud Medications System API - Implementation Template
Developer guide
Medications Dev Guide
The US-Core Medications application uses the following DataWeave modules to map between Health Cloud and FHIR formats.
Module | Description |
---|---|
fhirtools | fhirtools DataWeave library (dw::Immunization::fhirtools) contains functions used for converting Health Cloud data into FHIR format. |
fhirtools | fhirtools DataWeave library (dw::Medication::fhirtools) contains functions used for converting Health Cloud data into FHIR format.. |
fhirtools | fhirtools DataWeave library (dw::MedicationRequest::fhirtools) contains functions used for converting Health Cloud data into FHIR format.. |
fhirtools | fhirtools DataWeave library (dw::MedicationStatement::fhirtools) contains functions used for converting Health Cloud data into FHIR format.. |
upsertGetRequests | This module (dw::Immunization::upsertGetRequests) defines functions needed to convert a FHIR Immunization resource into it's representation within Health Cloud. |
upsertGetRequests | This module (dw::Medication::upsertGetRequests) defines functions needed to convert a FHIR Medication resource into it's representation within Health Cloud. |
upsertGetRequests | This module (dw::MedicationRequest::upsertGetRequests) defines functions needed to convert a FHIR MedicationRequest resource into it's representation within Health Cloud. |
upsertGetRequests | This module (dw::MedicationStatement::upsertGetRequests) defines functions needed to convert a FHIR MedicationStatement resource into it's representation within Health Cloud. |
fhirtools
fhirtools DataWeave library (dw::Immunization::fhirtools) contains functions used for converting Health Cloud data into FHIR format.
Source:
.src/main/resources/dwl/Immunization/fhirtools.dwl
Functions
fun getResponse (objRLU)
Generates the FHIR response with the provided Immunization Object.
param
objRLU
is the Immunization object to map.
return A Health Cloud Immunization response.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
Identifier.use | Identifier | IdUsageType | Values: usual | official | temp | secondary | old |
Identifier.system | Identifier | SourceSystem | The namespace for the identifier value. |
Identifier.value | Identifier | IdValue | The value of the identifier. |
Identifier.type.coding.system | Identifier | CodeSet.SourceSystem | Identity of the terminology system. |
Identifier.type.coding.version | Identifier | CodeSet.SystemVersion | Version of the system. |
Identifier.type.coding.code | Identifier | CodeSet.Code | The code value. |
Identifier.type.coding.display | Identifier | CodeSet.Name | The display value of the code. |
Identifier.type.text | Identifier | CodeSetBundle.Name | Plain text representation of the identifier. |
status | PatientImmunization | Status | Values: completed | entered-in-error | not-done |
statusReason.coding.system | PatientImmunization | CodeSet.SourceSystem | Reason not done. Identity of the terminology system. |
statusReason.coding.version | PatientImmunization | CodeSet.SystemVersion | Reason not done. Version of the system. |
statusReason.coding.code | PatientImmunization | CodeSet.Code | Reason not done. The code value. |
statusReason.coding.display | PatientImmunization | CodeSet.Name | Reason not done. Representation defined by the system. |
statusReason.text | PatientImmunization | CodeSetBundle.Name | Reason not done. Plain text representation of the concept. |
vaccineCode.coding.system | PatientImmunization | CodeSet.SourceSystem | Vaccine product administered. Identity of the terminology system. |
vaccineCode.coding.version | PatientImmunization | CodeSet.SystemVersion | Vaccine product administered. Version of the system. |
vaccineCode.coding.code | PatientImmunization | CodeSet.Code | Vaccine product administered. The code value. |
vaccineCode.coding.display | PatientImmunization | CodeSet.Name | Vaccine product administered. Representation defined by the system. |
vaccineCode.text | PatientImmunization | CodeSetBundle.Name | Vaccine product administered. Plain text representation of the concept. |
patient | PatientImmunization | PatientId | The patient who was immunized. |
encounter | PatientImmunization | ClinicalEncounterId | The encounter the immunization was part of. |
occurrenceDateTime | PatientImmunization | VaccinationDate | The vaccine administration date datetime. |
occurenceString | PatientImmunization | VaccinationPeriod | The vaccine administration date string. |
recorded | PatientImmunization | RecordCreationDateTime | When the immunization was first recorded. |
primarySource | PatientImmunization | IsRecordedByVaccinator | Indicates context the data was recorded in. |
reportOrigin.coding.system | PatientImmunization | CodeSet.SourceSystem | The source of the secondarily reported record. Identity of the terminology system. |
reportOrigin.coding.version | PatientImmunization | CodeSet.SystemVersion | The source of the secondarily reported record. Version of the system. |
reportOrigin.coding.code | PatientImmunization | CodeSet.Code | The source of the secondarily reported record. The code value. |
reportOrigin.coding.display | PatientImmunization | CodeSet.Name | The source of the secondarily reported record. Representation defined by the system. |
reportOrigin.text | PatientImmunization | CodeSetBundle.Name | The source of the secondarily reported record. Plain text representation of the concept. |
location | PatientImmunization | FacilityId | Where the immunization occurred. |
manufacturer | PatientImmunization | Manufacturer | The vaccine manufacture. |
lotNumber | PatientImmunization | LotNumber | The vaccine lot number. |
expirationDate | PatientImmunization | ExpirationDate | The vaccine expiration date. |
site.coding.system | PatientImmunization | CodeSet.SourceSystem | The body site the vaccine was administered. Identity of the terminology system. |
site.coding.version | PatientImmunization | CodeSet.SystemVersion | The body site the vaccine was administered. Version of the system. |
site.coding.code | PatientImmunization | CodeSet.Code | The body site the vaccine was administered. The code value. |
site.coding.display | PatientImmunization | CodeSet.Name | The body site the vaccine was administered. Representation defined by the system. |
site.text | PatientImmunization | CodeSetBundle.Name | The body site the vaccine was administered. Plain text representation of the concept. |
route.coding.system | PatientImmunization | CodeSet.SourceSystem | How the vaccine entered the body. Identity of the terminology system. |
route.coding.version | PatientImmunization | CodeSet.SystemVersion | How the vaccine entered the body. Version of the system. |
route.coding.code | PatientImmunization | CodeSet.Code | How the vaccine entered the body. The code value. |
route.coding.display | PatientImmunization | CodeSet.Name | How the vaccine entered the body. Representation defined by the system. |
route.text | PatientImmunization | CodeSetBundle.Name | How the vaccine entered the body. Plain text representation of the concept. |
doseQuantity.value | PatientImmunization | Dose | The amount of vaccine administered value. |
doseQuantity.code | PatientImmunization | UnitCode | The amount of vaccine administered code. |
performer.function.coding.system | CarePerformer | CodeSet.SourceSystem | What type of performance was done. Identity of the terminology system. |
performer.function.coding.version | CarePerformer | CodeSet.SystemVersion | What type of performance was done. Version of the system. |
performer.function.coding.code | CarePerformer | CodeSet.Code | What type of performance was done. The code value. |
performer.function.coding.display | CarePerformer | CodeSet.Name | What type of performance was done. Representation defined by the system. |
performer.function.text | CarePerformer | CodeSetBundle.Name | What type of performance was done. Plain text representation of the concept. |
performer.actor | CarePerformer | PersonId | Organization or individual doing the performing. |
reasonCode.coding.system | PatientImmunization | CodeSet.SourceSystem | Why the immunization occurred. Identity of the terminology system. |
reasonCode.coding.version | PatientImmunization | CodeSet.SystemVersion | Why the immunization occurred. Version of the system. |
reasonCode.coding.code | PatientImmunization | CodeSet.Code | Why the immunization occurred. The code value. |
reasonCode.coding.display | PatientImmunization | CodeSet.Name | Why the immunization occurred. Representation defined by the system. |
reasonCode.text | PatientImmunization | CodeSetBundle.Name | Why the immunization occurred. Plain text representation of the concept. |
isSubpotent | PatientImmunization | IsSubpotent | The dose potency. |
subpotentReason.coding.system | PatientImmunization | CodeSet.SourceSystem | The reason for being subpoent. Identity of the terminology system. |
subpotentReason.coding.version | PatientImmunization | CodeSet.SystemVersion | The reason for being subpoent. Version of the system. |
subpotentReason.coding.code | PatientImmunization | CodeSet.Code | The reason for being subpoent. The code value. |
subpotentReason.coding.display | PatientImmunization | CodeSet.Name | The reason for being subpoent. Representation defined by the system. |
subpotentReason.text | PatientImmunization | CodeSetBundle.Name | The reason for being subpoent. Plain text representation of the concept. |
reasonReference | PatientImmunization | HealthConditionId | CareObservationId | DiagnosticSummary | Why the immunization occurred. |
reaction.date | PatientHealthReaction | ReactionDateTime | When the reaction started. |
reaction.detail | PatientHealthReaction | ObservationId | Information about the reaction. |
reaction.reported | PatientHealthReaction | IsSelfReported | Was the reaction self-reported. |
protocolApplied.series | PatientImmunization | ImmunizationRecommendation | The name of the vaccine series. |
protocolApplied.authority | PatientImmunization | RecommendingAuthority | The organization who is responsible for publishing recommendations. |
protocolApplied.targetDisease.coding.code | PatientImmunization | TargetDiseaseCodeId | The preventable disease being targetted. The code value. |
protocolApplied.doseNumberPositiveInt | PatientImmunization | CurrentDose | The dose number within the series. |
protocolApplied.seriesDosesPositiveInt | PatientImmunization | RecommendedDoses | The recommended number of doses for immunity. |
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
return A string with the entry URL.
fun convertFhirIdentifierUse (toConvert)
Converts the provided Salesforce Identifier use value from its Health Cloud value to the corresponding FHIR value. If not matched, this function just returns the passed in value.
param
toConvert
is a string with the Health Cloud use value to convert.
return A string with the converted FHIR use value or the input value if not matched.
fun convertFhirStatus (sfStatus)
Converts the provided Salesforce Immunization status value from its Health Cloud value to the corresponding FHIR value. If not matched, this function just returns the passed in value.
param
sfStatus
is a string with the Health Cloud status value to convert.
return A string with the converted FHIR status value or the input value if not matched.
fhirtools
fhirtools DataWeave library (dw::Medication::fhirtools) contains functions used for converting Health Cloud data into FHIR format..
Source:
.src/main/resources/dwl/Medication/fhirtools.dwl
Functions
fun getResponse (objRLU, unitOfMeasure)
Generates the Medication response object in FHIR format with associated objects queried from Health Cloud.
param
objRLU
is the Medication object along with related objects.
paramunitOfMeasure
is UnitOfMeasure codes.
return A FHIR formatted Medication object.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | Account | Id | Patient account Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding | Identifier | IdTypeId | Description of identifier that references a CodeSetBundle (a CodeableConcept) |
code.coding | Medication | MedicationCodeId | Codes that identify this medication referencing a CodeSetBundle (a CodeableConcept) |
status | Medication | Status | Status of Medication as active or inactive or |
manufacturer | Medication | ManufacturerId | Manufacturer of the item |
form | Medication | MedicationFormId | Form of Medication like tablet or powder or any other form |
amount.numerator.value | Medication | QuantityNumerator | Quantity Numerator to determine the amount of drug in package |
amount.numerator.unit | UnitOfMeasure | UnitCode | Unit Code for numerator to determine the amount of drug in package |
amount.denominator.value | Medication | QuantityDenominator | Quantity Denominator to determine the amount of drug in package |
amount.denominator.unit | UnitOfMeasure | UnitCode | Unit Code of denominator to determine the amount of drug in package |
ingredient.itemReference | MedicinalIngredient | IngredientId | Reference to an Ingredient item which can be an Ingredient or Substance. If its a Substance its stored as a CodeSetBundle (a CodeableConcept) |
ingredient.isActive | MedicinalIngredient | IsActive | Status of Ingredient like active or inactive |
ingredient.strength.numerator.value | MedicinalIngredient | StrengthNumerator | Strength Numerator to determine the quantity of ingredient present |
ingredient.strength.numerator.unit | MedicinalIngredient | StrengthNumeratorUnitId | Unit Code for numerator to determine the quantity of ingredient present |
ingredient.strength.denominator.value | MedicinalIngredient | StrengthDenominator | Quantity Denominator to determine the quantity of ingredient present |
ingredient.strength.denominator.unit | MedicinalIngredient | StrengthDenominatorUnitId | Unit Code of denominator to determine the quantity of ingredient present |
ingredient.itemCodeableConcept | MedicinalIngredient | IngredientId | Reference to an Ingredient stored as a CodeSetBundle (a CodeableConcept) |
batch.lotNumber | Medication | BatchNumber | Identifier assigned to batch |
batch.expirationDate | Medication | ExpirationDateTime | When batch will expire |
fun getUnitOfMeasureUnitCode (unitOfMeasureCodes, unitCodeId)
Gets the UnitCode for an associated UnitId from UnitOfMeasure list.
param
unitOfMeasureCodes
is the UnitOfMeasure list that has all records
paramunitCodeId
is the codeId to filter the associated unit code.
return a UnitCode for an Id
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
return A string with the entry URL.
fhirtools
fhirtools DataWeave library (dw::MedicationRequest::fhirtools) contains functions used for converting Health Cloud data into FHIR format..
Source:
.src/main/resources/dwl/MedicationRequest/fhirtools.dwl
Functions
fun getResponse (objRLU, codeSetLookupResponse, groupIdentifierLU)
Generates the FHIR response with the provided MedicationRequest Object.
param
objRLU
is the MedicationRequest object to map.
paramcodeSetLookupResponse
is the lookup response for codesets.
paramgroupIdentifierLU
is the groupIdentifier lookup response.
return A Health Cloud MedicationRequest response.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | MedicationRequest | Id | MedicationRequest Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
status | MedicationRequest | Status | MedicationRequest Status |
statusReason | MedicationRequest | StatusReasonCodeId | Reason for current status |
intent | MedicationRequest | Type | MedicationRequest intent |
category | MedicationRequest | MedicationAdministrationContextId | Grouping or category of medication request |
priority | MedicationRequest | Priority | Priority of medication request |
doNotPerform | MedicationRequest | IsIgnored | True if patient is to stop taking or not to start taking the medication |
medicationCodeableConcept | MedicationRequest | MedicationCodeId | Medication to be taken |
medicationReference | MedicationRequest | MedicationId | Medication to be taken |
subject | MedicationRequest | PatientId | Who or group medication request is for |
reportedBoolean | MedicationRequest | IsSecondaryInformation | Reported rather than primary record |
reportedReference | MedicationRequest | SecondarySourceId | Reported rather than primary record |
encounter | MedicationRequest | ClinicalEncounterId | Encounter created as part of encounter or admission or stay |
authoredOn | MedicationRequest | PrescribedDate | When request was initially authored |
requester | MedicationRequest | RequesterId | Who or What requested the Request |
performer | MedicationRequest | PerformerId | Intended performer of administration |
performerType | MedicationRequest | PerformerTypeId | Desired kind of performer of the medication administration |
reasonCode | MedicationRequest | ReasonCodeId | Reason or indication for ordering or not ordering the medication |
reasonReference | MedicationRequest | ReasonReferenceId | Condition or observation that supports why the prescription is being written |
basedOn | MedicationRequest | RelatedRequestId | A plan or request that is fulfilled this medication request |
groupIdentifier | MedicationRequest | MedicationRequestGroupId | Composite request this is part of |
courseOfTherapyType | MedicationRequest | TherapyDuration | Overall pattern of medication administration |
dosageInstruction.sequence | PatientMedicationDosage | Sequence | The order of the dosage instructions |
dosageInstruction.text | PatientMedicationDosage | Comments | Free text dosage instructions |
dosageInstruction.additionalInstruction.text | PatientMedicationDosage | AdditionalInstruction | Supplemental instruction to the patient |
dosageInstruction.patientInstruction | PatientMedicationDosage | PatientInstruction | Patient or consumer oriented instructions |
dosageInstruction.asNeededBoolean | PatientMedicationDosage | IsAsNeeded | This value set includes all clinical findings |
dosageInstruction.site | PatientMedicationDosage | SiteId | Body site to administer to |
dosageInstruction.route | PatientMedicationDosage | RouteId | How drug should enter body |
dosageInstruction.method | PatientMedicationDosage | MethodId | Technique for administering medication |
dosageInstruction.doseAndRate.type | PatientMedicationDosage | DosageDefinitionType | The kind of dose or rate specified |
dosageInstruction.doseAndRate.doseRange.low.value | PatientMedicationDosage | DosageQuantityNumerator | Low limit |
dosageInstruction.doseAndRate.doseRange.low.unit | unitOfMeasure | UnitCode | unit code value |
dosageInstruction.doseAndRate.doseRange.high.value | PatientMedicationDosage | DosageQuantityDenominator | High limit |
dosageInstruction.doseAndRate.doseRange.high.unit | unitOfMeasure | UnitCode | unit code value |
dosageInstruction.doseAndRate.doseQuantity.value | PatientMedicationDosage | DosageQuantityNumerator | Dose quantity value |
dosageInstruction.doseAndRate.doseQuantity.unit | unitOfMeasure | UnitCode | unit code value |
dosageInstruction.doseAndRate.rateRange.low.value | PatientMedicationDosage | DosageRateNumerator | Low limit |
dosageInstruction.doseAndRate.rateRange.low.unit | unitOfMeasure | UnitCode | unit code value |
dosageInstruction.doseAndRate.rateRange.high.value | PatientMedicationDosage | DosageRateDenominator | High limit |
dosageInstruction.doseAndRate.rateRange.high.unit | unitOfMeasure | UnitCode | unit code value |
dosageInstruction.doseAndRate.rateRatio.low.value | PatientMedicationDosage | DosageRateNumerator | Low limit |
dosageInstruction.doseAndRate.rateRatio.low.unit | unitOfMeasure | UnitCode | unit code value |
dosageInstruction.doseAndRate.rateRatio.high.value | PatientMedicationDosage | DosageRateDenominator | High limit |
dosageInstruction.doseAndRate.rateRatio.high.unit | unitOfMeasure | UnitCode | unit code value |
dosageInstruction.doseAndRate.rateQuantity.value | PatientMedicationDosage | DosageRateNumerator | Dose rate value |
dosageInstruction.doseAndRate.rateQuantity.unit | unitOfMeasure | UnitCode | unit code value |
dispenseRequest.initialFill.quantity.value | MedicationRequest | InitialFillQuantity | First fill details |
dispenseRequest.initialFill.quantity.unit | MedicationRequest | FillQuantityUnitId | unit code value |
dispenseRequest.initialFill.duation.value | MedicationRequest | InitialFillDuration | First fill duration |
dispenseRequest.initialFill.duation.unit | MedicationRequest | FillDurationUnitId | unit code value |
dispenseRequest.initialFill.dispenseInterval.value | MedicationRequest | DispenseInterval | Minimum period of time between dispenses |
dispenseRequest.initialFill.dispenseInterval.unit | MedicationRequest | DispenseIntervalUnitId | unit code value |
dispenseRequest.validityPeriod.start | MedicationRequest | PrescriptionPeriodStart | Time period supply is authorized for |
dispenseRequest.validityPeriod.end | MedicationRequest | PrescriptionPeriodEnd | Time period supply is authorized for |
dispenseRequest.numberOfRepeatsAllowed | MedicationRequest | RefillsAllowed | Number of refills authorized |
dispenseRequest.quantity.value | MedicationRequest | RefillQuantity | Amount of medication to supply per dispense |
dispenseRequest.quantity.unit | MedicationRequest | FillQuantityUnitId | unit code value |
dispenseRequest.expectedSupplyDuration.value | MedicationRequest | RefillDuration | Number of days supply per dispense |
dispenseRequest.expectedSupplyDuration.unit | MedicationRequest | FillDurationUnitId | unit code value |
dispenseRequest.performer | MedicationRequest | DispenserId | Intended dispenser |
substitution.allowedBoolean | MedicationRequest | CanSubstitute | Whether substitution is allowed or not |
substitution.allowedCodeableConcept | MedicationRequest | AllowedSubstitutionTypeCodeId | Whether substitution is allowed or not |
substitution.reason | MedicationRequest | SubstitutionReasonCodeId | Why should (not) substitution be made |
priorPrescription | MedicationRequest | PreviousPrescriptionId | Reference to prescription that is being replaced by this MedicationRequest |
fun getUnitOfMeasureCode (unitOfMeasureCodes, unitCodeId)
Gets the UnitCode for an associated ID from UnitOfMeasure list.
param
unitOfMeasureCodes
is the UnitOfMeasure list that has all records
paramunitCodeId
is the Id to filter the associated unitCode.
return an unitCode for the Id
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
return A string with the entry URL.
fhirtools
fhirtools DataWeave library (dw::MedicationStatement::fhirtools) contains functions used for converting Health Cloud data into FHIR format..
Source:
.src/main/resources/dwl/MedicationStatement/fhirtools.dwl
Functions
fun getResponse (objRLU, fhirCodeSetCategory, fhirCodeSetDosageType)
Generates the FHIR response with the provided MedicationStatement Object.
param
objRLU
is the MedicationStatement object to map.
paramfhirCodeSetCategory
is FHIR Codeset object for Category.
paramfhirCodeSetDosageType
is FHIR Codeset object for DosageType.
return A Health Cloud MedicationStatement response.
FHIR Field Name | Salesforce Object Name | Salesforce Field Name | Mapping Description |
---|---|---|---|
id | MedicationStatement | Id | MedicationStatement Id |
Identifier.use | Identifier | IdUsageType | Identifies the purpose for this identifier |
identifier.system | Identifier | SourceSystem | Identifier system for resource |
identifier.value | Identifier | IdValue | Identifier value for resource |
identifier.type.coding.code | Identifier | IdTypeId | Description of identifier |
identifier.period.start | Identifier | EffectiveDate | Starting time with inclusive boundary |
identifier.period.end | Identifier | EndDate | End time with inclusive boundary |
identifier.assigner | Identifier | IssuingAuthorityId | Organization that issued id (may be just text) |
status | MedicationStatement | Status | The status of the diagnostic report. |
basedOn | MedicationStatement | MedicationRequestId | Details concerning a service requested. |
context | MedicationStatement | ClinicalEncounterId | Encounter or Episode associated with MedicationStatement |
subject | MedicationStatement | PatientId | Who is taking the medication |
dateAsserted | MedicationStatement | AssertionDateTime | When the statement was asserted? |
partOf | MedicationStatement | ParentMedicationStatementId or ProcedureId or CareObservationId | Part of referenced event |
statusReason.coding.code | MedicationStatement | StatusReasonCodeId | Reason for current status |
category.coding.code | MedicationStatement | DeliverySetting | Type of medication usage |
medicationCodeableConcept.coding.code | MedicationStatement | MedicationCodeId | What medication was taken |
medicationReference | MedicationStatement | MedicationId | What medication was taken |
effectiveDateTime | MedicationStatement | StartDateTime | The date & time when the medication is taken |
effectivePeriod.start | MedicationStatement | StartDateTime | The interval when the medication is taken |
effectivePeriod.end | MedicationStatement | EndDateTime | The interval when the medication is taken |
informationSource | MedicationStatement | StatementSourceId | When the statement was asserted? |
reasonCode.coding.code | MedicationStatement | MedicationReasonCodeId | Reason for why the medication is being taken |
reasonReference | MedicationStatement | MedicationReasonId | Reason for why the medication is being taken |
dosage | PatientMedicationDosage | Dosage instructions | |
dosage.sequence | PatientMedicationDosage | Sequence | The order of the dosage instructions |
dosage.text | PatientMedicationDosage | Comments | Free text dosage instructions |
dosage.additionlInstruction.coding.code | PatientMedicationDosage | AdditionalInstruction | Supplemental instruction or warnings to the patient |
dosage.patientInstruction | PatientMedicationDosage | PatientInstruction | Patient or consumer oriented instructions |
dosage.timing.code | PatientMedicationDosage | TimingId | When medication should be administered |
dosage.asNeededBoolean | PatientMedicationDosage | IsAsNeeded | Take as needed |
dosage.site.coding.code | PatientMedicationDosage | SiteId | Body site to administer to |
dosage.route.coding.code | PatientMedicationDosage | RouteId | How drug should enter body |
dosage.method.coding.code | PatientMedicationDosage | MethodId | Technique for administering medication |
dosage.doseAndRate.type.coding.code | PatientMedicationDosage | DosageDefinitionType | Amount of medication per dose |
dosage.doseAndRate.doseQuantity.code | PatientMedicationDosage | DosageQuantityType | Amount of medication per dose |
dosage.doseAndRate.doseQuantity.value | PatientMedicationDosage | DosageQuantityNumerator | Amount of medication per dose |
dosage.doseAndRate.doseQuantity.unit | PatientMedicationDosage | DosageUnitId | Amount of medication per dose |
dosage.doseAndRate.rate.numerator.code | PatientMedicationDosage | DosageRateType | Amount of medication per unit of time |
dosage.doseAndRate.rate.numerator.value | PatientMedicationDosage | DosageRateNumerator | Amount of medication per unit of time |
dosage.doseAndRate.rate.denominator.unit | PatientMedicationDosage | DosageRateUnitId | Amount of medication per unit of time |
dosage.doseAndRate.rate.denominator.value | PatientMedicationDosage | DosageRateDenominator | Amount of medication per unit of time |
fun getLinkSelf ()
Gets the URL to the current web resource.
return A string with the self link.
fun getEntryUrl (item: Object)
Gets the URL for the entry provided.
param
item
is an object with the item that's being returned.
return A string with the entry URL.
upsertGetRequests
This module (dw::Immunization::upsertGetRequests) defines functions needed to convert a
FHIR Immunization resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Immunization/upsertGetRequests.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getImmunizationUpsert (fhirObj, codeSetBundleList, quantityUnitId)
Converts the provided Immunization FHIR object to the Health Cloud Immunization object.
param
fhirObj
is a FHIR Immunization object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Immunization object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object.
return Health Cloud Immunization upsert fields.
fun getImmunizationUpdate (fhirObj, codeSetBundleList, quantityUnitId)
Converts the provided Immunization FHIR object to the Health Cloud Immunization object.
param
fhirObj
is a FHIR Immunization object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Immunization object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object.
return Health Cloud Immunization update fields.
fun getCarePerformer (identifier, parentRecordId, CarePerformerParentsRoleId)
Converts the provided Immunization FHIR object to the Health Cloud CarePerformer object.
param
identifier
is a FHIR Identifier object.
paramparentRecordId
is the ImmunizationId
paramCarePerformerParentsRoleId
is the RoleId (CodeSetBundle)
return Health Cloud Immunization upsert fields.
fun getPatientHealthReaction (parentRecordId, reaction)
Converts the provided Immunization FHIR object to the Heath Cloud PatientHealthReaction object.
param
parentRecordId
is the PatientImmunization ID.
paramreaction
is the Immunization.reaction object.
return A Health Cloud PatientHealthReaction upsert object.
fun getCodeSetUpsert (codeSetList)
Converts the provided Immunization FHIR object to the Health Cloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return Health Cloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Immunization FHIR object to the Health Cloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
paramname
is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.
fun getIdentifierUpsert (identifier, parentRecordId, typeId)
Converts the provided Immunization FHIR object to the Health Cloud Identifier object.
param
identifier
is the list of Identifier object.
paramparentRecordId
is the associated Immunization Id
paramtypeId
is the IdTypeId (CodesetBundle) of Identifier
return Health Cloud Identifier upsert fields.
fun convertSalesforceIdentifierUse (toConvert)
Converts the provided FHIR Identifier use value from its FHIR value to the corresponding Health Cloud value. If not matched, this function just returns the passed in value.
param
toConvert
is a string with the FHIR use value to convert.
return A string with the converted Health Cloud use value or the input value if not matched.
fun convertSalesforceStatus (fhirStatus)
Converts the provided FHIR Immunization status value from its FHIR value to the corresponding Health Cloud value. If not matched, this function just returns the passed in value.
param
fhirStatus
is a string with the FHIR status value to convert.
return A string with the converted Health Cloud status value or the input value if not matched.
upsertGetRequests
This module (dw::Medication::upsertGetRequests) defines functions needed to convert a
FHIR Medication resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/Medication/upsertGetRequests.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getMedicationUpsert (fhirObj, codeSetBundleList, unitOfMeasureCodes)
Converts the provided Medication FHIR object to the Health Cloud Medication object.
param
fhirObj
is a FHIR Medication object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Medication object
paramunitOfMeasureCodes
is a UnitCode from UnitOfMeasure object. which references to UnitOfMeasure Object
return Health Cloud Medication upsert fields.
fun getMedicationUpdate (fhirObj, codeSetBundleList, unitOfMeasureCodes)
Converts the provided Medication FHIR object to the Health Cloud Medication object.
param
fhirObj
is a FHIR Medication object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the Medication object
paramunitOfMeasureCodes
is a UnitCode from UnitOfMeasure object. which references to UnitOfMeasure Object
return Health Cloud Medication upsert fields.
fun getCodeSetUpsert (codeSetList)
Converts the provided Medication FHIR object to the Health Cloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return Health Cloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided Medication FHIR object to the Health Cloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
paramname
is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.
fun getIdentifierUpsert (identifier, parentRecordId, typeId)
Converts the provided Medication FHIR object to the Health Cloud Identifier object.
param
identifier
is the list of Identifier object.
paramparentRecordId
is the associated Medication Id
paramtypeId
is the IdTypeId (CodesetBundle) of Identifier
return Health Cloud Identifier upsert fields.
fun getIngredientUpsert (ingredient, parentRecordId, ingredientId, unitOfMeasureCodes)
Converts the provided ingredient FHIR object to the Health Cloud MedicinalIngredient object.
param
ingredient
is the list of ingredient objects.
paramparentRecordId
is the associated Medication Id
paramunitOfMeasureCodes
is unit of measure from UnitOfMesaure Object
return Health Cloud Identifier upsert fields.
fun getUnitOfMeasureCodeId (unitOfMeasureCodes, unitCode)
Gets the Id for an associated UnitCode from UnitOfMeasure list.
param
unitOfMeasureCodes
is the UnitOfMeasure list that has all records
paramunitCode
is the unitCode to filter the associated unit Id.
return an Id for the unitCode
upsertGetRequests
This module (dw::MedicationRequest::upsertGetRequests) defines functions needed to convert a
FHIR MedicationRequest resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/MedicationRequest/upsertGetRequests.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getMedicationRequestUpsert (fhirObj, codeSetBundleList, unitOfMeasureCodes, upsertLookupResponse, groupIdentifierId)
Converts the provided MedicationRequest FHIR object to the Health Cloud MedicationRequest object.
param
fhirObj
is a FHIR MedicationRequest object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the MedicationRequest object
return Health Cloud MedicationRequest upsert fields.
fun getMedicationRequestUpdate (fhirObj, codeSetBundleList, unitOfMeasureCodes, upsertLookupResponse, groupIdentifierId)
Converts the provided MedicationRequest FHIR object to the Health Cloud MedicationRequest object.
param
fhirObj
is a FHIR MedicationRequest object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the MedicationRequest object
return Health Cloud MedicationRequest update fields.
fun getPMDosageUpsert (fhirObj, codeSetBundleList, acc_QuantityUnitId_doseQuantity, acc_QuantityUnitId_rateQuantity, index, parentId, unitOfMeasureCodes)
Converts the provided dosageInstruction FHIR object to the Health Cloud PatientMedicationDosage object.
param
fhirObj
is a FHIR MedicationRequest object.
paramcodeSetBundleList
is the List of codeSetBundle Ids
paramacc_QuantityUnitId_doseQuantity
is the List of doseQuantity Ids
paramacc_QuantityUnitId_rateQuantity
is the List of rateQuantity Ids
paramindex
is PatientMedicationDosage index
paramparentId
is the ParentRecordId
return A Health Cloud MedicationRequest object.
fun getCodeSetUpsert (codeSetList)
Converts the provided MedicationRequest FHIR object to the Health Cloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return Health Cloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided MedicationRequest FHIR object to the Health Cloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
paramname
is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.
fun getIdentifierUpsert (identifier, parentRecordId, typeId)
Converts the provided MedicationRequest Identifier FHIR object to the Health Cloud Identifier object.
param
identifier
is the list of Identifier object.
paramparentRecordId
is the associated MedicationRequest Id
paramtypeId
is the IdTypeId (CodesetBundle) of Identifier
return Health Cloud Identifier upsert fields.
fun getPickListValue (inputValue, lookupValue)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in MedicationRequest upsert.
param
inputValue
is a FHIR object field, lookupValue is from FHIRCodeSetc. return_ value for the picklist field.
fun getUnitOfMeasureCodeId (unitOfMeasureCodes, unitCode)
Gets the Id for an associated UnitCode from UnitOfMeasure list.
param
unitOfMeasureCodes
is the UnitOfMeasure list that has all records
paramunitCode
is the unitCode to filter the associated unit Id.
return an Id for the unitCode
upsertGetRequests
This module (dw::MedicationStatement::upsertGetRequests) defines functions needed to convert a
FHIR MedicationStatement resource into it's representation within
Health Cloud.
Source:
.src/main/resources/dwl/MedicationStatement/upsertGetRequests.dwl
Functions
fun getResultIds (res)
This function takes the results of a Salesforce query and returns a list of IDs.
param
res
is a Salesforce query result.
return An array with a list of Ids found.
fun getPickListValue (req, lookupReq)
Converts the FHIR CodeableConcept fields and result from lookup to get the values for picklist field used in Encounter upsert.
param
req
is a FHIR object field, lookupReq is from FHIRCodeSetc. return_ value for the picklist field.
fun getPMDosageUpsert (fhirObj, codeSetBundleList, QuantityUnitId, index, parentId, fhirCodeSetDosageType)
Converts the provided dosage FHIR object to the Health Cloud PatientMedicationDosage object.
param
fhirObj
is a FHIR MedicationRequest object.
paramcodeSetBundleList
is the List of codeSetBundle Ids
paramQuantityUnitId
is the List of UnitOfMeasure CodeSet bundles
paramindex
is PatientMedicationDosage index
paramparentId
is the ParentRecordId
return A Health Cloud MedicationRequest object.
fun getmedicationStatementUpsert (fhirObj, codeSetBundleList, quantityUnitId, fhirCodeSetCategory)
Converts the provided MedicationStatement FHIR object to the Health Cloud MedicationStatement object.
param
fhirObj
is a FHIR MedicationStatement object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the MedicationStatement object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object.
paramfhirCodeSetCategory
is CodeSet Object for Category
return Health Cloud MedicationStatement upsert fields.
fun getmedicationStatementUpdate (fhirObj, codeSetBundleList, quantityUnitId, fhirCodeSetCategory)
Converts the provided MedicationStatement FHIR object to the Health Cloud MedicationStatement object.
param
fhirObj
is a FHIR MedicationStatement object.
paramcodeSetBundleList
is the list of CodeSetBundle objects for the MedicationStatement object
paramquantityUnitId
is a UnitCode from UnitOfMeasure object.
paramfhirCodeSetCategory
is CodeSet Object for Category
return Health Cloud MedicationStatement update fields.
fun getCodeSetUpsert (codeSetList)
Converts the provided MedicationStatement FHIR object to the Health Cloud CodeSet object.
param
codeSetList
is the list of codeSet object.
return Health Cloud CodeSet upsert fields.
fun getCodeSetBundleUpsert (codeSetList, bundleType, name)
Converts the provided FHIR MedicationStatement object to the Health Cloud CodeSetBundle object.
param
codeSetList
is the list of CodeSetBundle object.
parambundleType
is for defining the CodeSetBundle type.
paramname
is for defining the name of the CodeSetBundle.
return Health Cloud CodeSetBundle upsert fields.
fun getIdentifierUpsert (identifier, parentRecordId, typeId)
Converts the provided MedicationStatement FHIR object to the Health Cloud Identifier object.
param
identifier
is the list of Identifier object.
paramparentRecordId
is the associated MedicationStatement Id
paramtypeId
is the IdTypeId (CodesetBundle) of Identifier
return Health Cloud Identifier upsert fields.